package com.luoc.service.impl;

import com.luoc.service.DecoratorComponent;

/**
 * @Author: luoc
 * @Date: 2019/9/20 10:34
 * 装饰模式(Decorator Pattern)：动态地给一个对象增加一些额外的职责，
 * 就增加对象功能来说，装饰模式比生成子类实现更为灵活。装饰模式是一种对象结构型模式。
 */
public   class Decorator extends DecoratorComponent{


    private DecoratorComponent component;

    public Decorator(DecoratorComponent component){
        this.component = component;
    }

    @Override
    public void opration() {
        System.out.println("装饰器");
    }
}
